/*
 * Bitonic Tour Problem
 * http://blog.csdn.net/fangxia722/article/details/3051450
 */

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;

class Point {
	unsigned x;
	unsigned y;
	Point(unsigned x, unsigned y) {
		this->x = x;
		this->y = y;
	}

	double Distance(const Point &p) {
		return sqrt((x - p.x) ^ 2 + (y - p.y) ^ 2);
	}

	static double Distance(const Point &p1, const Point &p2) {
		return sqrt((p1.x - p2.x) ^ 2 + (p1.y - p2.y) ^ 2);
	}
};

bool onTheLeft(const Point &p1, const Point &p2) {
	if (p1.x < p2.x) {
		return true;
	} else {
		return false;
	}
}
//TODO: 还没写完
class BitonicTour {
private:
	vector<Point> dots;
	BitonicTour() {
		dots.push_back(Point(1, 2));
		dots.push_back(Point(2, 2));
		dots.push_back(Point(3, 2));
//		.....
		sort(dots.begin(), dots.end(), onTheLeft);
	}

	double solve() {
		vector <vector<double> > opt;
		unsigned i, j;

		for (i=0; i<dots.size(); i++)
		{
			opt[i]
		}
		return minDist;
	}
};
